#!/usr/bin/env python
#coding=utf-8

"""
Macho Inspector Server Startup Script
This script starts the FastAPI server using uvicorn
"""

import os
import sys
import uvicorn

# Add the project root to Python path
sys.path.append(os.path.dirname(os.path.realpath(__file__)))

import config

def main():
    print(f"Starting Macho Inspector Service on {config.SERVER_IP}:{config.SERVER_PORT}")
    print(f"HTML files path: {config.HTML_PATH}")
    print(f"Product root path: {config.PRODUCT_ROOT_PATH}")
    print("=" * 50)

    uvicorn.run(
        "main:app",
        host=config.SERVER_IP,
        port=config.SERVER_PORT,
        reload=False,
        log_level="info",
        access_log=True
    )

if __name__ == "__main__":
    main()